package com.heima.zuoye.day09.timu2;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;

public class OutputStreamTest {
    public static void main(String[] args) throws Exception {
        FileInputStream fis = new FileInputStream("D:\\img1\\001.jpeg");
        FileOutputStream fos = new FileOutputStream("D:\\img2\\001.jpeg");
        int num;
        byte[] bytes = new byte[1024];
        while ((num = fis.read(bytes)) != -1) {
            fos.write(bytes, 0, num);
        }
        fis.close();
        fos.close();
    }
}
